package util;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

public class LogCreater {
	
	public static void createLog(String logPath,String log) {
		
		FileOutputStream fos;
			try {
				fos = new FileOutputStream(logPath,true);
				OutputStreamWriter osw=new OutputStreamWriter(fos,"GBK");
				osw.write(log+"\n");
				osw.flush();
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}
		
	
}